<html style='width:425px; Height: 150px;'>
<head>
<title>Form Editor</title>

<style> 
html, 
body, 
button, 
div, 
input, 
select, 
fieldset { font-family: MS Shell Dlg; font-size: 8pt; position: absolute; }; 
</style>

<script language='javascript'>
  document.title = "Form Editor";
  
  var highlightedText = window.dialogArguments;
  var type = "clientemail";
  
  function returnSelected() {
	if (type == "clientemail") {
		var text = escape("<FORM style='border:1px dotted #ff0000;height:20px'");
		if (document.set.action.value != "") {
			text = text + escape( " action=\"" ) ;
			text = text + escape( document.set.action.value );
		}
		if (document.set.email.value != "") {
			text = text + escape( document.set.email.value );
		}
		text = text + escape( "\"" ) ;
		text = text + escape( " method=\"" ) ;
		text = text + escape( document.set.method.value );
		text = text + escape( "\"" ) ;

                text = text + escape( " enctype=\"multipart/form-data\"" ) ;

		text = text + escape( ">" );
		text = text + escape("</FORM>") ;
	}
	window.returnValue = text;
	window.close();
  }
  
  function updateTarget() {
	var selectedItem	= document.set.type.selectedIndex;
	var selectedItemValue	= document.set.type.options[selectedItem].value;
	type = selectedItemValue;

	var lblEmail = document.getElementById ("divEmail")
        
	if (type == "clientemail") {
		lblEmail.style.display = "block"
		document.set.email.style.display = "block" ;
		document.set.action.value = "mailto" ;
		document.set.action.disabled = true ;	
		document.set.fldLayout.style.height = "10.2em" ;	
		window.dialogHeight = "150px" ;
	}
	else if (type == "serveremail") {
		lblEmail.style.display = "block"
		document.set.email.style.display = "block" ;
		document.set.action.value = "mailform.asp" ;
		document.set.action.disabled = false ;
		document.set.fldLayout.style.height = "10.2em" ;	
		window.dialogHeight = "150px" ;
	}	
	else if (type == "serverstore") {
		lblEmail.style.display = "none"
		document.set.email.style.display = "none" ;
		document.set.action.value = "saveform.asp" ;
		document.set.action.disabled = false ;
		document.set.fldLayout.style.height = "8.2em" ;	
		window.dialogHeight = "125px" ;
	}	
	else if (type == "serverstoreemail") {
		lblEmail.style.display = "block"
		document.set.email.style.display = "block" ;
		document.set.action.value = "savemailform.asp" ;
		document.set.action.disabled = false ;
		document.set.fldLayout.style.height = "10.2em" ;	
		window.dialogHeight = "150px" ;
	}	
	else if (type == "custom") {
		lblEmail.style.display = "none"
		document.set.email.style.display = "none" ;
		document.set.action.value = "" ;
		document.set.action.disabled = false ;
		document.set.fldLayout.style.height = "8.2em" ;	
		window.dialogHeight = "125px" ;
	}	
  }
</script>
</head>
<body style='background: threedface; color: windowtext; margin: 10px; BORDER-STYLE: none' scroll=no>

<form method=post name=set>
<fieldset id=fldLayout style='left: 0.50em; top: 0.5em; width: 31.5em; height: 10.2000em;'></fieldset>
<div id=divType style='left: 1.50em; top: 1.5em; width: 5.0em; height: 1.2168em;'>Type</div>
<div id=divTypedropdown style='left: 7.00em; top: 1.4em; width: 7.0em; height: 1.2168em;'>
<select name=type onChange='javascript: updateTarget();'>
	<option value="clientemail" selected>mailto form
	<option value="serveremail">mailto script
        <option value="serverstore">saveto script
	<option value="serverstoreemail">saveto & mailto script
	<option value="custom">custom script
</select>
</div>
<div id=divAction style='left: 1.50em; top: 4.0em; width: 5em; height: 1.2168em;'>Action</div>
<input style='left: 7.00em; top: 3.6em; width: 23.80em; height: 2.0000em;' name=action type=text value="mailto:" size=30 disabled=true>
<div id=divMethod style='left: 1.50em; top: 6.1em; width: 5.0em; height: 1.2168em;'>Method</div>
<div id=divMethoddropdown style='left: 7.00em; top: 5.8em; width: 7.0em; height: 1.2168em;'>
<select name=method onChange='javascript: updateTarget();'>
	<option value="post" selected>Post
	<option value="get">Get
</select>
</div>
<div id=divEmail style='left: 1.50em; top: 8.2em; width: 5em; height: 1.2168em;'>Email</div>
<input style='left: 7.00em; top: 7.9em; width: 23.80em; height: 2.0000em;' name=email type=text value="" size=30>
<input style='left: 32.50em; top: 0.5em; width: 6em; height: 2.2000em;' value=OK  type=button onClick='returnSelected()'>
<input style='left: 32.50em; top: 3.0em; width: 6em; height: 2.2000em;' value=Cancel type=button onClick='window.close()'>
</form>
</body>
</html>